package eip.chapter3.pubsub;

import java.io.Serializable;

/**
 * Java representation of the regulation update.
 * 
 * @author nl24167
 */
public class RegulationUpdate implements Serializable {

	private static final long serialVersionUID = -6641330551033957819L;
	
	private String name;
	private int id;
	private String description;
	
	//--------------------------------------------
	// Constructors
	//--------------------------------------------
	
	public RegulationUpdate() {
	}
	
	public RegulationUpdate(int id, String name, String description) {
		this.name = name;
		this.id = id;
		this.description = description;
	}
	
	//---------------------------------------------
	// Simple setters and getters
	//---------------------------------------------

	public String getDescription() {
		return description;
	}
	
	public void setDescription(String description) {
		this.description = description;
	}
	
	public int getId() {
		return id;
	}
	
	public void setId(int id) {
		this.id = id;
	}
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	/**
	 * Constructs a <code>String</code> with all attributes
	 * in name = value format.
	 *
	 * @return a <code>String</code> representation 
	 * of this object.
	 */
	public String toString()
	{
	    final String TAB = "    ";
	    
	    String retValue = "";
	    
	    retValue = "RegulationUpdate ( "
	        + super.toString() + TAB
	        + "name = " + this.name + TAB
	        + "id = " + this.id + TAB
	        + "description = " + this.description + TAB
	        + " )";
	    
	    return retValue;
	}	
}
